package top.littleze.aiattendance.enums;

/**
 * @Author ZhaoGengze
 * @Date 2021/7/9 17:02
 */

public enum CodeEnums {

    HAS_UPDATE_PHOTO("901", "已上传照片"),
    NOT_UPDATE_PHOTO("902", "暂未上传照片"),
    Server_Error("500", "服务端错误"),
    ;

    CodeEnums(String code, String name) {
        this.code = code;
        this.name = name;
    }

    private final String code;
    private final String name;

    public static String getNameByCode(String code) {
        for (CodeEnums o : values()) {
            if (o.getCode().equals(code)) {
                return o.getName();
            }
        }

        return null;
    }

    public String getCode() {
        return code;
    }
    public String getName() {return name;}


}
